﻿@model MVC_Store.Models.ViewModels.Pages.SidebarVM

@{
    ViewBag.Title = "Edit Sidebar";
}

<h2>Edit Sidebar</h2>

@if (TempData["SM"] != null)
{
    <div class="alert alert-success">
        @TempData["SM"]
    </div>
}

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        @Html.HiddenFor(model => model.Id)

        <div class="form-group">
            @*@Html.LabelFor(model => model.Body, htmlAttributes: new { @class = "control-label col-md-2" })*@
            <div class="col-md-10">
                @Html.TextAreaFor(model => model.Body, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Body, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Edit" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<!--Скрипт подмены для CKEditor-->
@section Scripts 
{
    <script>
        CKEDITOR.replace("Body")
    </script>
}

